package com.edwin.websitebe.config;

import com.edwin.websitebe.util.OSSUtil;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        String basePath = "file:/opt/website-resource/";
        registry.addResourceHandler("/download/**").addResourceLocations(basePath);
    }
}
